﻿namespace FSpec

open Microsoft.FSharp.Quotations 

[<AutoOpen>]
module StandardSyntax =
    let should      = new ShouldFragment()
    let shouldNot    = new ShouldNotFragment()
    
    let confirmThat expression =
        verify(fun()->
            if not(expression) then
                createFailureFrom Resources.TheExpressionShouldEvaluateToTrue
                |> toFailureException
            else
                null
        )

    let rejectIf expression =
        verify(fun()->
            if expression then
                createFailureFrom "The expression should evaluate to false."
                |> toFailureException
            else
                null
        )
    
